package base;

/**
 * Created by IntelliJ IDEA. User: njussien Date: 30/11/12 Time: 10:39
 */
public abstract class Quantification extends Formule {

	protected Variable x;
	protected Formule f;

	// ///////////////
	// CONSTRUCTOR //
	// ///////////////

	public Quantification(Variable x, Formule f) {
		super();
		this.x = x;
		this.f = f;
	}

	// ///////////
	// METHODS //
	// ///////////

	@Override
	public boolean contains(Variable var) {
		return f.contains(var) || var.getName().equals(x.getName());
	}

	public void renommer() {
		f.renommer();
	}

	// ///////////////////////
	// GETTERS AND SETTERS //
	// ///////////////////////

	public Variable getX() {
		return x;
	}

	public Formule getF() {
		return f;
	}

	public void setX(Variable x) {
		this.x = x;
	}

	public void setF(Formule f) {
		this.f = f;
	}

	public boolean contains(Atome a) {
		return (f.contains(a));
	}

	public boolean containsNegative(Atome a) {
		return f.containsNegative(a);
	}

}
